package com.myhome.config;

import com.myhome.domain.GeetestProperties;
import com.myhome.geetest.GeetestLib;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author QYiXin
 * @Date 2021 10 14 13 21
 **/
@Configuration
@EnableConfigurationProperties(GeetestProperties.class)
public class GeetestAutoConfiguration {
    @Autowired
    GeetestProperties geetestProperties;
    @Bean
    public GeetestLib geetestLib(){
        GeetestLib geetestLib = new GeetestLib(geetestProperties.getGeetestId(), geetestProperties.getGeetestKey());
        return geetestLib ;
    }
}
